package com.yonyou.cyxdms.sysAuth.service.config;

import feign.Request;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.context.annotation.Bean;

/**
 * MultipartSupportConfig
 *
 * @author LiJun
 * @Description
 * @date 2019/6/13 16:23
 */
public class MultipartSupportConfig {
    public static final int CONNECT_TIMEOUT_MILLIS = 60000;//超时时间
    public static final int READ_TIMEOUT_MILLIS = 60000;

    @Bean
    public Encoder feignFormEncoder() {
        return new SpringFormEncoder();
    }


    @Bean
    public Request.Options options() {
        return new Request.Options(CONNECT_TIMEOUT_MILLIS, READ_TIMEOUT_MILLIS);
    }
}
